1
bash
This demonstrates the difference between double and single quotes in Bash for variable expansion, emphasizing the importance of correct quoting practices.
echo "$variable" # => Some string echo '$variable' # => $variable # When you use a variable itself — assign it, export it, or else — you write # its name without $. If you want to use the variable's value, you should use $. # Note that ' (single quote) won't expand the variables! # You can write variable without surrounding quotes but it's not recommended.
bash internaldata manipulationsstring manipulation and expansionsvariable expansion